struct appdata //allvarligt. det här får mig att hata.
{
	float4 position : POSITION0;
	float4 color	: COLOR0;
	float2 tex		: texcoord;
};

struct vfconn
{
	float4 color	: COLOR0;
};

float raw_noise(int x, int y, int random) {
	float ret;
    int n = x + y * 57 + random * 131;
    n = (n<<13) ^ n;
    ret = (1.0f - ( (n * (n * n * 15731 + 789221) + 1376312589)&0x7fffffff)* 0.000000000931322574615478515625f);
	return ret;
}

vfconn main(appdata IN,uniform sampler2D decal) {
	vfconn OUT;
	
	//OUT.color = IN.color;
	//OUT.color.x += OUT.color.y*0.2 + sin(OUT.color.x*OUT.color.x*90);
	//OUT.color.x = raw_noise((int)IN.tex.x,IN.tex.y,1337);
	//OUT.color.y = raw_noise((int)IN.tex.x,IN.tex.y,1337);
	OUT.color += tex2D(decal, IN.tex);
	//OUT.color.y += OUT.color.y*0.2 + sin(OUT.color.y*OUT.color.x*90) * 0.05;
	
	return OUT;
}